package com.fairytask.engine.components.group
{
	import com.fairytask.engine.components.BaseComponent;
	
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	
	public class TileGroup extends BaseComponent
	{
		//常量定义
		//============================================================================
		public static const HORIZONTAL	:int	=	0;
		public static const VERICAL		:int	=	1;
		//============================================================================
		
		private var _maxRow	:int	=	1;
		private var _maxCols	:int	=	1;
		private var _verticalSpace		:int	=	0;
		private var _horizontalSpace	:int	=	0;
		private var _direction		:int=	0;
		
		private var _currentCount	:int=0;
		private var _maxCount		:int=12;
		
		private var _itemArr	:Array	=	[];
		
		public function TileGroup(maxCount:int=12,arrangement:int=HORIZONTAL)
		{
			super();
			_direction	=	arrangement;
			_maxCount	=	maxCount;
			initTiles();
		}
		
		private function initTiles():void
		{
			while(_maxCount>0)
			{
				
			}
		}
		
		public function addItem(val:DisplayObject):void
		{
			_itemArr.push(val);
			display();
		}
		
		private function display():void
		{
			var index:int	=	1;
			/*for(var val:DisplayObject in _itemArr)
			{
				
			}*/
		}

		public function get maxRow():int
		{
			return _maxRow;
		}

		public function set maxRow(value:int):void
		{
			_maxRow = value;
		}

		public function get maxCols():int
		{
			return _maxCols;
		}

		public function set maxCols(value:int):void
		{
			_maxCols = value;
		}

		public function get verticalSpace():int
		{
			return _verticalSpace;
		}

		public function set verticalSpace(value:int):void
		{
			_verticalSpace = value;
		}

		public function get horizontalSpace():int
		{
			return _horizontalSpace;
		}

		public function set horizontalSpace(value:int):void
		{
			_horizontalSpace = value;
		}

		public function get itemArr():Array
		{
			return _itemArr;
		}

		public function set itemArr(value:Array):void
		{
			_itemArr = value;
		}


	}
}